Optimal. Leaf size=242 \[ \frac{5 x^3}{3}-\frac{\left (835 x^2+1468\right ) x}{64 \left (x^4+2 x^2+3\right )}+\frac{25 \left (5 x^2+3\right ) x}{16 \left (x^4+2 x^2+3\right )^2}-\frac{21}{512} \sqrt{22721 \sqrt{3}-34271} \log \left (x^2-\sqrt{2 \left (\sqrt{3}-1\right )} x+\sqrt{3}\right )+\frac{21}{512} \sqrt{22721 \sqrt{3}-34271} \log \left (x^2+\sqrt{2 \left (\sqrt{3}-1\right )} x+\sqrt{3}\right )-27 x-\frac{21}{256} \sqrt{34271+22721 \sqrt{3}} \tan ^{-1}\left (\frac{\sqrt{2 \left (\sqrt{3}-1\right )}-2 x}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right )+\frac{21}{256} \sqrt{34271+22721 \sqrt{3}} \tan ^{-1}\left (\frac{2 x+\sqrt{2 \left (\sqrt{3}-1\right )}}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.309967, antiderivative size = 242, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 8, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.258, Rules used = {1668, 1678, 1676, 1169, 634, 618, 204, 628} \[ \frac{5 x^3}{3}-\frac{\left (835 x^2+1468\right ) x}{64 \left (x^4+2 x^2+3\right )}+\frac{25 \left (5 x^2+3\right ) x}{16 \left (x^4+2 x^2+3\right )^2}-\frac{21}{512} \sqrt{22721 \sqrt{3}-34271} \log \left (x^2-\sqrt{2 \left (\sqrt{3}-1\right )} x+\sqrt{3}\right )+\frac{21}{512} \sqrt{22721 \sqrt{3}-34271} \log \left (x^2+\sqrt{2 \left (\sqrt{3}-1\right )} x+\sqrt{3}\right )-27 x-\frac{21}{256} \sqrt{34271+22721 \sqrt{3}} \tan ^{-1}\left (\frac{\sqrt{2 \left (\sqrt{3}-1\right )}-2 x}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right )+\frac{21}{256} \sqrt{34271+22721 \sqrt{3}} \tan ^{-1}\left (\frac{2 x+\sqrt{2 \left (\sqrt{3}-1\right )}}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1668
Rule 1678
Rule 1676
Rule 1169
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{x^8 \left (4+x^2+3 x^4+5 x^6\right )}{\left (3+2 x^2+x^4\right )^3} \, dx &=\frac{25 x \left (3+5 x^2\right )}{16 \left (3+2 x^2+x^4\right )^2}+\frac{1}{96} \int \frac{-450-1050 x^2+2400 x^4-672 x^8+480 x^{10}}{\left (3+2 x^2+x^4\right )^2} \, dx\\ &=\frac{25 x \left (3+5 x^2\right )}{16 \left (3+2 x^2+x^4\right )^2}-\frac{x \left (1468+835 x^2\right )}{64 \left (3+2 x^2+x^4\right )}+\frac{\int \frac{98496+27432 x^2-78336 x^4+23040 x^6}{3+2 x^2+x^4} \, dx}{4608}\\ &=\frac{25 x \left (3+5 x^2\right )}{16 \left (3+2 x^2+x^4\right )^2}-\frac{x \left (1468+835 x^2\right )}{64 \left (3+2 x^2+x^4\right )}+\frac{\int \left (-124416+23040 x^2+\frac{1512 \left (312+137 x^2\right )}{3+2 x^2+x^4}\right ) \, dx}{4608}\\ &=-27 x+\frac{5 x^3}{3}+\frac{25 x \left (3+5 x^2\right )}{16 \left (3+2 x^2+x^4\right )^2}-\frac{x \left (1468+835 x^2\right )}{64 \left (3+2 x^2+x^4\right )}+\frac{21}{64} \int \frac{312+137 x^2}{3+2 x^2+x^4} \, dx\\ &=-27 x+\frac{5 x^3}{3}+\frac{25 x \left (3+5 x^2\right )}{16 \left (3+2 x^2+x^4\right )^2}-\frac{x \left (1468+835 x^2\right )}{64 \left (3+2 x^2+x^4\right )}+\frac{1}{256} \left (7 \sqrt{3 \left (1+\sqrt{3}\right )}\right ) \int \frac{312 \sqrt{2 \left (-1+\sqrt{3}\right )}-\left (312-137 \sqrt{3}\right ) x}{\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx+\frac{1}{256} \left (7 \sqrt{3 \left (1+\sqrt{3}\right )}\right ) \int \frac{312 \sqrt{2 \left (-1+\sqrt{3}\right )}+\left (312-137 \sqrt{3}\right ) x}{\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx\\ &=-27 x+\frac{5 x^3}{3}+\frac{25 x \left (3+5 x^2\right )}{16 \left (3+2 x^2+x^4\right )^2}-\frac{x \left (1468+835 x^2\right )}{64 \left (3+2 x^2+x^4\right )}-\frac{1}{512} \left (21 \sqrt{-34271+22721 \sqrt{3}}\right ) \int \frac{-\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x}{\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx+\frac{1}{512} \left (21 \sqrt{-34271+22721 \sqrt{3}}\right ) \int \frac{\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x}{\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx+\frac{1}{256} \left (21 \sqrt{51217+28496 \sqrt{3}}\right ) \int \frac{1}{\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx+\frac{1}{256} \left (21 \sqrt{51217+28496 \sqrt{3}}\right ) \int \frac{1}{\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2} \, dx\\ &=-27 x+\frac{5 x^3}{3}+\frac{25 x \left (3+5 x^2\right )}{16 \left (3+2 x^2+x^4\right )^2}-\frac{x \left (1468+835 x^2\right )}{64 \left (3+2 x^2+x^4\right )}-\frac{21}{512} \sqrt{-34271+22721 \sqrt{3}} \log \left (\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2\right )+\frac{21}{512} \sqrt{-34271+22721 \sqrt{3}} \log \left (\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2\right )-\frac{1}{128} \left (21 \sqrt{51217+28496 \sqrt{3}}\right ) \operatorname{Subst}\left (\int \frac{1}{-2 \left (1+\sqrt{3}\right )-x^2} \, dx,x,-\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x\right )-\frac{1}{128} \left (21 \sqrt{51217+28496 \sqrt{3}}\right ) \operatorname{Subst}\left (\int \frac{1}{-2 \left (1+\sqrt{3}\right )-x^2} \, dx,x,\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x\right )\\ &=-27 x+\frac{5 x^3}{3}+\frac{25 x \left (3+5 x^2\right )}{16 \left (3+2 x^2+x^4\right )^2}-\frac{x \left (1468+835 x^2\right )}{64 \left (3+2 x^2+x^4\right )}-\frac{21}{256} \sqrt{34271+22721 \sqrt{3}} \tan ^{-1}\left (\frac{\sqrt{2 \left (-1+\sqrt{3}\right )}-2 x}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right )+\frac{21}{256} \sqrt{34271+22721 \sqrt{3}} \tan ^{-1}\left (\frac{\sqrt{2 \left (-1+\sqrt{3}\right )}+2 x}{\sqrt{2 \left (1+\sqrt{3}\right )}}\right )-\frac{21}{512} \sqrt{-34271+22721 \sqrt{3}} \log \left (\sqrt{3}-\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2\right )+\frac{21}{512} \sqrt{-34271+22721 \sqrt{3}} \log \left (\sqrt{3}+\sqrt{2 \left (-1+\sqrt{3}\right )} x+x^2\right )\\ \end{align*}
Mathematica [C] time = 0.210776, size = 155, normalized size = 0.64 \[ \frac{5 x^3}{3}-\frac{\left (835 x^2+1468\right ) x}{64 \left (x^4+2 x^2+3\right )}+\frac{25 \left (5 x^2+3\right ) x}{16 \left (x^4+2 x^2+3\right )^2}-27 x+\frac{21 \left (137 \sqrt{2}-175 i\right ) \tan ^{-1}\left (\frac{x}{\sqrt{1-i \sqrt{2}}}\right )}{128 \sqrt{2-2 i \sqrt{2}}}+\frac{21 \left (137 \sqrt{2}+175 i\right ) \tan ^{-1}\left (\frac{x}{\sqrt{1+i \sqrt{2}}}\right )}{128 \sqrt{2+2 i \sqrt{2}}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.022, size = 426, normalized size = 1.8 \begin{align*}{\frac{5\,{x}^{3}}{3}}-27\,x+{\frac{1}{ \left ({x}^{4}+2\,{x}^{2}+3 \right ) ^{2}} \left ( -{\frac{835\,{x}^{7}}{64}}-{\frac{1569\,{x}^{5}}{32}}-{\frac{4941\,{x}^{3}}{64}}-{\frac{513\,x}{8}} \right ) }+{\frac{693\,\ln \left ({x}^{2}+\sqrt{3}-x\sqrt{-2+2\,\sqrt{3}} \right ) \sqrt{-2+2\,\sqrt{3}}\sqrt{3}}{1024}}-{\frac{3675\,\ln \left ({x}^{2}+\sqrt{3}-x\sqrt{-2+2\,\sqrt{3}} \right ) \sqrt{-2+2\,\sqrt{3}}}{1024}}+{\frac{ \left ( -1386+1386\,\sqrt{3} \right ) \sqrt{3}}{512\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x-\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }-{\frac{-7350+7350\,\sqrt{3}}{512\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x-\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }+{\frac{273\,\sqrt{3}}{8\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x-\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }-{\frac{693\,\ln \left ({x}^{2}+\sqrt{3}+x\sqrt{-2+2\,\sqrt{3}} \right ) \sqrt{-2+2\,\sqrt{3}}\sqrt{3}}{1024}}+{\frac{3675\,\ln \left ({x}^{2}+\sqrt{3}+x\sqrt{-2+2\,\sqrt{3}} \right ) \sqrt{-2+2\,\sqrt{3}}}{1024}}+{\frac{ \left ( -1386+1386\,\sqrt{3} \right ) \sqrt{3}}{512\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x+\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }-{\frac{-7350+7350\,\sqrt{3}}{512\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x+\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) }+{\frac{273\,\sqrt{3}}{8\,\sqrt{2+2\,\sqrt{3}}}\arctan \left ({\frac{2\,x+\sqrt{-2+2\,\sqrt{3}}}{\sqrt{2+2\,\sqrt{3}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{5}{3} \, x^{3} - 27 \, x - \frac{835 \, x^{7} + 3138 \, x^{5} + 4941 \, x^{3} + 4104 \, x}{64 \,{\left (x^{8} + 4 \, x^{6} + 10 \, x^{4} + 12 \, x^{2} + 9\right )}} + \frac{21}{64} \, \int \frac{137 \, x^{2} + 312}{x^{4} + 2 \, x^{2} + 3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.8097, size = 2421, normalized size = 10. \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.606788, size = 80, normalized size = 0.33 \begin{align*} \frac{5 x^{3}}{3} - 27 x - \frac{835 x^{7} + 3138 x^{5} + 4941 x^{3} + 4104 x}{64 x^{8} + 256 x^{6} + 640 x^{4} + 768 x^{2} + 576} + 21 \operatorname{RootSum}{\left (17179869184 t^{4} + 8983937024 t^{2} + 1548731523, \left ( t \mapsto t \log{\left (- \frac{1107296256 t^{3}}{310800559} + \frac{438857984 t}{310800559} + x \right )} \right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (5 \, x^{6} + 3 \, x^{4} + x^{2} + 4\right )} x^{8}}{{\left (x^{4} + 2 \, x^{2} + 3\right )}^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]